package in.iqing.view.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import butterknife.Bind;
import butterknife.OnClick;
import in.iqing.app.R;
import in.iqing.base.BaseActivity;
import in.iqing.model.sp.AccountSP;

/**
 * Created by ZuoShu on 15/7/6.
 */
public class UserActivity extends BaseActivity {
    @Bind(R.id.avatar)
    ImageView avatar;

    @Bind(R.id.username)
    TextView username;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user);
    }

    @Override
    protected void onResume() {
        super.onResume();
        username.setText(AccountSP.getUserName());
    }

    @OnClick(R.id.logout)
    public void onLogoutClick(View v) {
        AccountSP.clearLoginAccount();
        finish();
    }

    @OnClick(R.id.back)
    public void onBackClick(View v){
        finish();
    }
}
